from celery_tasks.main import app
from django.core.mail import send_mail


@app.task
def celery_send_email(subject, message, from_email, recipient_list, html_message):
    # subject = '主题'  # 主题
    # message = '爱青青'  # 内容
    # from_email = '美多商城<18290922922@163.com>'  # 发件人
    # recipient_list = ['1198681842@qq.com']  # 收件人列表
    # html_message = "点击按钮进行激活<a href='http://www.baidu.com?token=%s'>激活</a>" % token  # 发送html文件

    send_mail(subject=subject, message=message, from_email=from_email, recipient_list=recipient_list,
              html_message=html_message)
